<?php
/*
 * @Author: CHINAKAIYUAN<sunkaiyuan@namenode.cn>
 * @Date: 2022-02-03 00:33:05
 * @LastEditTime: 2023-11-03 16:06:31
 * @LastEditors: 孙开源 && sunkaiyuan@namenode.cn
 * @Description: BOM成品工艺
 */

namespace App\Models;

use App\Traits\CarryTrait;
use App\Traits\CarTrait;

class ProOutsourcingFinishDetail extends PurchaseStorageDetails
    {
    use CarryTrait;
    use CarTrait;
    protected $_instorage_way_id = 3;
    public function main()
        {
        return $this->belongsTo(ProOutsourcingFinish::class, "main_id");
        }

    public function getSourceAddr()
        {
        return $this->old_location->name;
        }
    //运输派车目的地址
    public function getTargetAddr()
        {
        return $this->creator->department?->name ?? "染厂";
        }
    }